﻿@model SetUserViewModel
@{
    ViewData["Menu"] = 9;
    ViewData["Title"] = "个人信息";
    var session = ViewContext.HttpContext.Session.Get<AdminSession>(nameof(AdminSession));
}

<main class="ftdms-layout-content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-lg-12">
                <div class="card">
                    <div class="card-body">

                        <div class="edit-avatar-content">
                            <iframe frameborder="0" scrolling="no" height="320" width="500" name="upload" src="@Url.Action("Avatar","Upload",new { id = Model.touxiang, type = UploadType.Avatar, objectId = Model.id })"></iframe> <br>
                        </div>

                        @using (Html.BeginForm(FormMethod.Post, true, new { @class = "site-form" }))
                        {
                            @Html.HiddenFor(m => m.id)
                            <div class="input-group m-b-10">
                                <span class="input-group-addon">I D</span>
                                @Html.TextBoxFor(m => m.oaid, new { @class="form-control", @readonly="readonly" })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">姓名</span>
                                @Html.TextBoxFor(m => m.xingming, new { @class="form-control", @required="required" })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">所属单位</span>
                                @Html.TextBoxFor(m => m.danwei, new { @class="form-control", @required="required", @onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')", @onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"  })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">所属上级</span>
                                @Html.DropDownListFor(m => m.pid,new List<SelectListItem>() { new SelectListItem(){ Selected = true, Text = session.adminuser ,Value = $"{session.adminid}" } },null, new { @class="form-control", @readonly="readonly"  })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">电话</span>
                                @Html.TextBoxFor(m => m.dianhua, new { @class="form-control", @required="required" })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">邮箱</span>
                                @Html.TextBoxFor(m => m.email, new { @type="email", @class="form-control", @aria_describedby="emailHelp"  })
                            </div>

                            <div class="input-group m-b-10">
                                <span class="input-group-addon">简介</span>
                                @Html.TextAreaFor(m => m.remark,new { @class="form-control", @rows="3" })
                            </div>

                            <button type="submit" class="btn btn-primary">保存</button>
                            <button type="button" class="btn btn-default" onclick="javascript:history.go(-1);">返回</button>
                        }
                    </div>
                </div>
            </div>
        </div>
    </div>
</main>

